

import java.awt.Color;
import java.awt.GraphicsEnvironment;

import javax.swing.*;


/**
 * Sets up and launches the main window for the tealServ system
 * 
 * @author Mike Jones
 * @version 1.0 
 */
public class StartSystem extends JFrame {

	private static JFrame frame;
	 /**
	 * Creates a window and calls to the LogIn class
	 */
	public StartSystem(){
		frame = new JFrame();
		frame.setTitle("tealServ");
		frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		
		/*These instructions obtain the max width and height of the computer screen */
		GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        frame.setMaximizedBounds(ge.getMaximumWindowBounds());
        frame.setExtendedState(frame.getExtendedState() | frame.MAXIMIZED_BOTH);
		//Used to remove the borders - user cannot minimize, maximize, or close the window
        frame.setUndecorated(true);
		Color color = UIManager.getColor("activeCaptionBorder");
		frame.getRootPane().setBorder(BorderFactory.createLineBorder(color, 4));
		frame.setResizable(false);
        
    	LogIn logIn = new LogIn();
		frame.add(logIn);
		frame.pack();
		frame.setVisible(true);
	}//End of StartSystem
	
	
	/**
	 * Closes the StartSystem JFrame
	 */
	public static void closeFrame(){
		frame.dispose();
	}//End closeFrame method
	
		
	/**
	 * Creates an instance of the StartSystem window
	 * @param args
	 */
	public static void main(String[] args) {
		
		StartSystem window = new StartSystem();

	}//End of main method

}//End of Class
